using System;
using System.Data;
using System.Linq;
using System.Data.Linq;
using System.Linq.Expressions;
using System.Data.Linq.Mapping;
using System.Collections;
using System.Collections.Generic;
using Widgetsphere.Core.DataAccess;

namespace ACME.Northwind.Business.LINQ
{
	/// <summary>
	/// This is a helper object for running LINQ queries on the CustomerDemographic collection.
	/// </summary>
	[Serializable()]
	[Table(Name = "CustomerDemographics")]
	public partial class CustomerDemographicQuery : IBusinessObjectLINQQuery
	{
		#region Properties
		/// <summary>
		/// (Maps to the 'CustomerDemographics.CustomerTypeID' database field)
		/// </summary>
		[Column(Name = "CustomerTypeID", DbType = "NChar(10)", CanBeNull = false, IsPrimaryKey = true)]
		public virtual string CustomerTypeId { get; set; }
		/// <summary>
		/// (Maps to the 'CustomerDemographics.CustomerDesc' database field)
		/// </summary>
		[Column(Name = "CustomerDesc", DbType = "NText(16)", CanBeNull = true, IsPrimaryKey = false)]
		public virtual string CustomerDesc { get; set; }
		/// <summary>
		/// The date of creation
		/// </summary>
		[Column(Name = "created_date", DbType = "DateTime", CanBeNull = true)]
		public virtual DateTime? CreatedDate { get; set; }
		/// <summary>
		/// The name of the creating entity
		/// </summary>
		[Column(Name = "created_by", DbType = "VarChar(100)", CanBeNull = true)]
		public virtual string CreatedBy { get; set; }
		/// <summary>
		/// The date of last modification
		/// </summary>
		[Column(Name = "modified_date", DbType = "DateTime", CanBeNull = true)]
		public virtual DateTime? ModifiedDate { get; set; }
		/// <summary>
		/// The name of the last modifing entity
		/// </summary>
		[Column(Name = "modified_by", DbType = "VarChar(100)", CanBeNull = true)]
		public virtual string ModifiedBy { get; set; }
		/// <summary>
		/// This is an internal field and is not to be used.
		/// </summary>
		[Column(Name = "time_stamp", DbType = "Binary", CanBeNull = false)]
		public virtual byte[] TimeStamp { get; set; }

		/// <summary>
		/// This is a mapping of the relationship with the CustomerCustomerDemo entity.
		/// </summary>
		[Association(ThisKey = "CustomerTypeId", OtherKey = "CustomerTypeId")]
		public CustomerCustomerDemoQuery CustomerCustomerDemoEntity { get; private set; }

		#endregion

	}

}
